import store from '@/store'
import { mapGetters } from 'vuex'
const routeList = JSON.parse(store.getters.menu)

export const paneList = [
  
  
  {
  label: ' 首 页 ',
  name: 'home'
},
{
  label: '政策查询',
  name: 'Policy'
},
{
  label: '双碳节能',
  name: 'energySave'
},
{
  label: '智慧运营',
  name: 'operate'
},
{
  label: '96069客服',
  name: 'customer'
},
{
  label: '收费管理',
  name: 'charge'
},
{
  label: '设备运维',
  name: 'manage'
},
// {
//     label: '智慧人事',
//     name: 'personnel'
// },
{
  label: '关于我们',
  name: 'about'
}
]

// export var BackList = [{

//             label: '政策查询',
//             name: 'PolicyMan',
//             child: [{
//                 label: '政策查询管理',
//                 name: 'PolicyManage',
//             }, {
//                 label: '政策类型管理',
//                 name: 'PolicyTypeMan',
//             }, ]

//         },
//         {
//             label: '政策查询',
//             name: 'Policy',
//         },
//         {
//             label: '环保节能',
//             name: 'energySave'
//         },
//         {
//             label: '智慧运营',
//             name: 'operate'
//         },
//         {
//             label: '96069客服',
//             name: 'customer'
//         },
//         {
//             label: '智慧收费',
//             name: 'charge'
//         },
//         {
//             label: '设备管理',
//             name: 'manage'
//         },
// {
//     label: '智慧人事',
//     name: 'personnel'
// },
//     {
//         label: '关于我们',
//         name: 'about'
//     },
// ]
// export var BackList = []
// console.log('888')
// console.log(store.getters.url)

export var BackList = [
 
  {

  label: '政策查询',
  name: 'PolicyMan',
  child: [{
    label: '政策查询管理',
    name: 'PolicyManage'
  }, {
    label: '政策类型管理',
    name: 'PolicyTypeMan'
  }]

},
{
  label: '双碳节能',
  name: 'energyProManage',
  child: [
    // {
    //     label: '环保节能管理',
    //     name: 'enersaveProMan',
    // },
    {
      label: '环保产品管理',
      name: 'energyProMan'
    },
    {
      label: '环保产品分类管理',
      name: 'energyTypeMan'
    },
    {
      label: '环保厂家管理',
      name: 'energyFactoryMan'
    }
  ]
},
{
  label: '首页设置',
  name: 'homeSet'
},
{
  label: 'banner管理',
  name: 'bannerMan'
},
{
  label: '内容设置',
  name: 'contentSet'
},
{
  label: '价值设置',
  name: 'valueSet'
},
{
  label: '关于我们',
  name: 'aboutMan'
},
// {
//     label: '支持/服务管理',
//     name: 'supportMan'
// },
{
  label: '公司管理',
  name: 'companyMan'
},
{
  label: '机构管理',
  name: 'departmentMan'
},
{
  label: '用户管理',
  name: 'userMan'
},

{
  label: '菜单管理',
  name: 'menuMan'
},
{
  label: '角色管理',
  name: 'roleMan'
}
]
// if (store.getters.url == 'system') {
// if (routeList) {
//     BackList = routeList.systemList.children
// }
// BackList = BackList.slice(7, BackList.length)
// } else {
// if (routeList) {
//     BackList = routeList.BackList.children
// }
//     BackList = BackList.slice(0, 7)
// }
// var fn = (arr) => {
//     arr.map(item => {
//         item.label = item.menuName,
//             item.name = item.menuUrl.slice(1)
//         if (item.children) {
//             fn(item.children)
//         }
//     })
// }
// if (routeList && routeList.BackList.children) {
//     fn(routeList.BackList.children)

// }
// if (routeList && routeList.systemList.children) {
//     fn(routeList.systemList.children)
// }
// console.log(routeList.BackList.children)
// routeList.BackList.children.map(item => {
//     BackList.push({
//         label: item.menuName,
//         name: item.menuUrl,
//     })
//     if (item.children) {

//     }
// })
// console.log(BackList)

export const FornDetialList = [{
  label: '政策查询编辑',
  name: 'PolicyEdit',
  location: 'PolicyManage'
},
{
  label: '环保产品详情页',
  name: 'energyProManDetial',
  location: 'energyProMan'
}
]
// export const backDetialList = []
export const beforDetialList = [{
  label: '政策详情',
  name: 'PolicyDetial',
  location: 'Policy'
}, {
  label: '环保分类',
  name: 'energySaveClassify',
  location: 'energySave'
},
{
  label: '环保详情',
  name: 'energySaveDetial',
  location: 'energySave'
},
{
  label: '服务案例',
  name: 'homeDetial',
  location: 'home'
}
]
